home *** CD-ROM | disk | FTP | other *** search
/ Resource for Source: C/C++ / Resource for Source - C-C++.iso / misc_src / cslib16b / include / cstime.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-01  |  1.1 KB  |  49 lines

  1. /***********************************************************************
  2.  
  3.                                        CSA Library, Version 1.6.b 
  4.                                          Released: March 2nd 1995 
  5.  
  6.        Defining the TIME class.
  7.  
  8.                                            Copyright(c) 1994,1995 
  9.                                                            Combis 
  10.                                                   The Netherlands 
  11. ***********************************************************************/
  12.  
  13. #include "dos.h"
  14. #include "time.h"
  15. #include "cstypes.h"
  16.  
  17. class TIME
  18. {
  19. private:
  20.  
  21.   int hour;
  22.   int min;
  23.   int sec;
  24.   int hund;
  25.  
  26. public:
  27.   TIME(void);
  28.  
  29.   void now(void);
  30.  
  31.   int  hours(void )     { return hour; }
  32.   int  minutes(void )     { return min; }
  33.   int  seconds(void )     { return sec; }
  34.   int  hunderdths(void ) { return hund; }
  35.  
  36.   void    hours(int      i) { hour=i; }
  37.   void    minutes(int    i) { min=i;  }
  38.   void    seconds(int    i) { sec=i;  }
  39.   void    hunderdths(int i) { hund=i; }
  40.  
  41.   long cs_time(void);
  42.   void cs_time(long t);
  43.  
  44.   CSCHAR *asc_time(void);
  45.   operator char*()      { return asc_time(); }
  46.  
  47.  
  48. };
  49.